home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / menu-methods / menu-xdg < prev    next >
Encoding:
Text File  |  2007-09-28  |  1.4 KB  |  53 lines

  1. #!/usr/bin/install-menu
  2. # xdg menu spec - menu generation
  3. # http://www.freedesktop.org/Standards/menu-spec
  4. # Also used as /etc/menu-methods/menu-xdg
  5. # Copyright 2004 - Chris Cheney <ccheney@debian.org>
  6. # Licensed under the GNU General Public License, version 2.
  7.  
  8. !include menu.h
  9.  
  10. compat="menu-2"
  11. outputencoding="UTF-8";
  12. outputlanguage="C";
  13.  
  14. function Dirs() =
  15.     ifempty($section,ifroot(
  16.     "<AppDir>/var/lib/menu-xdg/applications</AppDir>\n"
  17.     "<DirectoryDir>/var/lib/menu-xdg/desktop-directories/menu-xdg</DirectoryDir>\n",
  18.     "<DirectoryDir>"
  19.     parent(parent(prefix()))
  20.     "/.local/share/desktop-directories/menu-xdg</DirectoryDir>\n"));
  21.  
  22. function DirEntry() =
  23.     Dirs()
  24.     "<Name>" title() "</Name>\n"
  25.     "<Directory>" "debian" replacewith(tolower($section),"/ ","--") ".directory" "</Directory>\n"
  26.     "<Include>\n"
  27.     "<Category>" "X-Debian" replacewith($section,"/ ","--") "</Category>\n"
  28.     "</Include>\n";
  29.  
  30.  
  31. supported;
  32.  x11 = ;
  33.  text = ;
  34. endsupported;
  35.  
  36. startmenu = "<Menu>\n" DirEntry();
  37. endmenu = "</Menu>\n";
  38. submenutitle = "";
  39.  
  40. treewalk = "(M)";
  41.  
  42. genmenu = "debian-menu.menu";
  43.  
  44. prerun = "rm -rf " prefix() "/debian-menu.menu";
  45.  
  46. rootsection = "";
  47.  
  48. preoutput = "<!DOCTYPE Menu PUBLIC \"-//freedesktop//DTD Menu 0.8//EN\"\n \"http://www.freedesktop.org/standards/menu-spec/menu-0.8.dtd\">\n<!-- Automatically generated do not edit -->\n";
  49.  
  50. rootprefix = "/var/lib/menu-xdg/menus";
  51.  
  52. userprefix = ".config/menus";
  53.